﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataLib.Accounts.Bus;

namespace DataLib.Accounts
{
    public partial class UserInfo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {

                if (Context.User.Identity.IsAuthenticated)
                {

                    AccountsPrincipal user = new AccountsPrincipal(Context.User.Identity.Name);
                    User currentUser = new User(user);

                    this.lblName.Text = currentUser.UserName;
                    this.lblTruename.Text = currentUser.TrueName;
                    this.lblSex.Text = currentUser.Sex;
                    this.lblPhone.Text = currentUser.Phone;
                    this.lblEmail.Text = currentUser.Email;

                    lblUserIP.Text = Request.UserHostAddress;

                   
                    lblBelong.Text = currentUser.CompanyCity;
                    lblDuty.Text = currentUser.Duty;

                    lblDepart.Text = currentUser.Department;


                }



            }
        }
    }
}